
div.show-form
table.table.table-inverse.table-striped.table-bordered.table-hover
  thead
    tr
      th 名称
      th 价格
      th 数量
      th 开始日期
      th 结束日期
      th 使用地区 
      th 类型
      th 领取数
      th 投放状态
      td(colspan="5") 操作
  tbody
    - @coupons.each do |coupon|
      tr
        td 
           = link_to coupon.name, coupons_show_path(params_item(coupon)), class: 'btn btn-info btn-xs'
        td = coupon.price
        td = coupon.number
        td = coupon.begin_date
        td = coupon.end_date
        td = coupon.region
        td = coupon.kind
        td = coupon.receive_count
        //td(style="color: red") = coupon.state ? '已投放': '未投放'
        - if coupon.state
          td(style="color: #46b8da;") 已投放
        - else
          td(style="color: #4cae4c;") 未投放
        td 
         - if coupon.state
          = link_to '关闭', hide_coupons_path(params_hash(coupon)), class: 'btn btn-info btn-xs font-style'
         - else 
          = link_to '投放', hide_coupons_path(params_hash(coupon)), class: 'btn btn-info btn-xs font-style'
        td = link_to '删除', coupons_path(params_hash(coupon)) , method: :post, class: 'btn btn-danger btn-xs font-style'
        td = link_to '图片', edit_coupons_path(params_hash(coupon)) , method: :post, class: 'btn btn-primary btn-xs font-style',remote: true
        td = link_to '查看', coupons_total_path(params_hash(coupon)) , method: :get, class: 'btn btn-success btn-xs font-style'
        td = link_to '导出', coupons_export_coupons_path(params: params_hash(coupon),:format => :xls), class: 'btn btn-info btn-xs'
                
  
